package com.xltq.service;

import com.xltq.entity.Orders;

import java.util.List;

//订单service的实现操作
public interface IOrdersService {
    /**
     * 创建订单
     * @param aid 地址id
     * @param uid 用户id
     * @param sum 总金额
     * @throws Exception
     */
     void createOrder(String aid, String uid, String sum) throws Exception;

    /**
     * 通过用户id获取用户所有订单信息
     * @param uid 用户id
     * @return 存储用户订单信息的list集合
     * @throws Exception
     */
     List<Orders> findOrdersByUid(int uid)throws Exception;

    /**
     * 通过订单id获取单独订单信息
     * @param oid
     * @return
     * @throws Exception
     */
     Orders findOrdersByOid(String oid)throws Exception;

    /**
     * 更改订单状态
     * @param oid 订单id
     * @param state 订单状态
     * @throws Exception
     */
     void updateStateByOid(String oid, String state) throws Exception;

}
